<?php

	Router::connect('/', array('controller' => 'homes', 'action' => 'index'));
/**
 * ...and connect the rest of 'Pages' controller's urls.
 */
	Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
        
        Router::connect('/admin', array('controller' => 'dashboard', 'action' => 'index','admin'=>true));
        
/*************************************************************
 *  Routing for ajax call for Tag select box propagation from 
 *  edit Subject  page when page loads for first time
 * 
 * ***********************************************************/
        
        Router::connect('/admin/Subjects/edit/tags', array('controller' => 'Subjects', 'action' => 'tags','admin'=>true));
        Router::connect('/admin/subjects/edit/tags', array('controller' => 'Subjects', 'action' => 'tags','admin'=>true));
        
/********************************************************
 *  Routing for ajax call for Tag select box propagation
 *  from edit Subject page when editing the Tag
 * 
 **********************************************************/
        
        Router::connect('/admin/Subjects/edit/tag', array('controller' => 'Subjects', 'action' => 'tag','admin'=>true));
        Router::connect('/admin/subjects/edit/tag', array('controller' => 'Subjects', 'action' => 'tag','admin'=>true));
        
/*********************************************
 *                                           *
 *  Tag routing from  edit Subject page ends *
 *                                           *
 * *******************************************/        
        
        Router::connect('/admin/Subjects/edit/adjectives', array('controller' => 'Subjects', 'action' => 'adjectives','admin'=>true));
        Router::connect('/admin/Subjects/edit/attributes', array('controller' => 'Subjects', 'action' => 'attributes','admin'=>true));
        Router::connect('/admin/subjects/edit/attributes', array('controller' => 'Subjects', 'action' => 'attributes','admin'=>true));
      
/*********************** ****************************************
 * Routing for ajax call for Tag select box propagation from    *
 * Subject approve page when page loads for first time          *
 *                                                              *
 * *************************************************************/
        
        Router::connect('/admin/Subjects/approve/tags', array('controller' => 'Subjects', 'action' => 'tags','admin'=>true));
        Router::connect('/admin/subjects/approve/tags', array('controller' => 'Subjects', 'action' => 'tags','admin'=>true));

/**********************************************************
 *  Routing for ajax call for Tag select box propagation  *
 *  from Aubject approve page when editing the Tag        *
 *                                                        *
 * ********************************************************/
        
        Router::connect('/admin/Subjects/approve/tag', array('controller' => 'Subjects', 'action' => 'tag','admin'=>true));
        Router::connect('/admin/subjects/approve/tag', array('controller' => 'Subjects', 'action' => 'tag','admin'=>true));
        Router::connect('/admin/Subjects/approve/adjectives', array('controller' => 'Subjects', 'action' => 'adjectives','admin'=>true));
        Router::connect('/admin/Subjects/approve/attributes', array('controller' => 'Subjects', 'action' => 'attributes','admin'=>true));
        Router::connect('/admin/subjects/approve/attributes', array('controller' => 'Subjects', 'action' => 'attributes','admin'=>true));
/***************** Tag routing from  Approve  Subject page ends*************************/       
     
        /*********************************  Routing for rating from admin view subject page   *****************************************/
        
         Router::connect('/admin/Subjects/view/rate', array('controller' => 'Subjects', 'action' => 'rate','admin'=>true));
                 Router::connect('/admin/Subjects/view/report', array('controller' => 'Subjects', 'action' => 'report','admin'=>true));
        Router::connect('/users', array('controller' => 'Homes', 'action' => 'index'));     
        
        /*********************************** Subject Search routing   */
          Router::connect('/admin/Subjects/index/search_suggestion', array('controller' => 'Subjects', 'action' => 'search_suggestion','admin'=>true));
        /*************************************SEO ROUGING***********************/
         
          if(isset($_GET['url']) && $_GET['url']=='profiles/profile'){
              Router::connect('profiles/profile', array('controller' => 'profiles','action'=>'profile'));
          }
       
             Router::connect('/subject/:id', array('controller' => 'subjects','action'=>'subject',array('pass' => array('id')))) ;
          //    Router::connect('/:id', array('controller' => 'subjects','action'=>'subject',array('pass' => array('id')))) ;
        
          Router::connect('/about_us', array('controller' => 'Staticpages','action'=>'about_us'));
          Router::connect('/faq', array('controller' => 'Staticpages','action'=>'faq'));
          Router::connect('/terms', array('controller' => 'Staticpages','action'=>'terms'));
          Router::connect('/privacy_policy', array('controller' => 'Staticpages','action'=>'privacy_policy'));
          Router::connect('/contact', array('controller' => 'Staticpages','action'=>'contact'));
          Router::connect('/:slug', array('controller' => 'profiles', 'action' => 'profile'), array('pass' => array('slug')));
       

        /************************************************************************/  
          